﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FabriqueAbstraite
{
    class Program
    {
        static void Main(string[] args)
        {
            Client clientPauvre = new Client();
            clientPauvre.Nom = "Penny La-Pauvre";
            clientPauvre.FabriqueMedicaments = new FabriqueMedicamentsGeneriques();
            clientPauvre.Medicament1 = clientPauvre.FabriqueMedicaments.CreerMedicament1();
            clientPauvre.Medicament2 = clientPauvre.FabriqueMedicaments.CreerMedicament2();

            Client clientRiche = new Client();
            clientRiche.Nom = "Riche-Ard Gold-Bar";
            clientRiche.FabriqueMedicaments = new FabriqueMedicamentsNonGeneriques();
            clientRiche.Medicament1 = clientRiche.FabriqueMedicaments.CreerMedicament1();
            clientRiche.Medicament2 = clientRiche.FabriqueMedicaments.CreerMedicament2();

            Console.WriteLine("\nNom: {0}\nMedicament1: {1}\nMedicament2: {2}", clientPauvre.Nom, clientPauvre.Medicament1, clientPauvre.Medicament2);

            Console.WriteLine("\n\nNom: {0}\nMedicament1: {1}\nMedicament2: {2}", clientRiche.Nom, clientRiche.Medicament1, clientRiche.Medicament2);

            Console.ReadLine();
        }
    }
}
